<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="/epms/static/Style/skin.css" />
    <style type="text/css">
        .white_content{  
            display: none;  
            position: absolute;  
            top: 10%;  
            left: 33%;  
            width: 36%;  
            border: 2px solid #d3d3d3;  
            background-color: #f2f2f2;  
            z-index: 1002;
            height: 300px;   
            /* overflow: auto; */   
        } 
        .stepInfo {
            position: relative;
            background: #f2f2f2;
            margin: 10px 10px 10px 30%;
            height: 200px; 
          }
          /*竖条显示*/
          .stepInfo ul {
            /*float: left;*/
            height: 100%;
            width: 0.6em;
            background: #FFB837;
          }
          .stepIco {
            /*圆形显示*/
            border-radius: 1.4em;
            padding: 0.2em;
            background: #45a0f3;
            text-align: center;
            line-height: 1.4em;
            color: #fff;
            position: absolute;
            width: 1.4em;
            height: 1.4em;
          }
          .stepIco1 {
            left: -0.7em;
            top: 0;
          }
          .stepIco2 {
            left: -0.7em;
            top: 50px;
          }
          .stepIco3 {
            left: -0.7em;
            top: 100px ;
          }
          .stepIco4 {
            left: -0.7em;
            top: 150px ;
          }
          .stepIco5 {
            left: -0.7em;
            top: 200px ;
          }
          .stepText {
            color: #666;
            margin-top: 0.2em;
            width: 4em;
            text-align: center;
            margin-left: -1.4em;
          }
          .info {
            /*信息布局及颜色*/
            position: absolute;
            font-size: large;
            color: black;
            margin: 0 0 0 25px;
            width: 200px;
            color: #45a0f3;
          }
          .info_1 {
            top: 0;
          }
          .info_2 {
            top: 50px;
          }
          .info_3 {
            top: 100px;
          }
          .info_4 {
            top: 150px;
          }
          .info_5 {
            top: 200px;
          }
          .yanse{
          clear: red;
          }
          
    </style>	    
</head>
<script type="text/javascript">
	function doSearch(index) {
		document.getElementById("pageIndex").value=index;
		document.getElementById("sform").submit();
	}
</script>
    <body>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <!-- 头部开始 -->
            <tr>
                <td width="17" valign="top" background="../../../static/Images/mail_left_bg.gif">
                    <img src="../../../static/Images/left_top_right.gif" width="17" height="29" />
                </td>
                <td valign="top" background="../../../static/Images/content_bg.gif">
                    <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" background="./../../../static/Images/content_bg.gif">
                        <tr><td height="31"><div class="title">流程管理</div></td></tr>
                    </table>
                </td>
                <td width="16" valign="top" background="../../../static/Images/mail_right_bg.gif"><img src="../../../static/Images/nav_right_bg.gif" width="16" height="29" /></td>
            </tr>
            <!-- 中间部分开始 -->
            <tr>
                <!--第一行左边框-->
                <td valign="middle" background="../../../static/Images/mail_left_bg.gif">&nbsp;</td>
                <!--第一行中间内容-->
                <td valign="top" bgcolor="#F7F8F9">
                    <table style="width:100%" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <!-- 空白行-->
                        <tr><td colspan="2" valign="top">&nbsp;</td><td>&nbsp;</td><td valign="top">&nbsp;</td></tr>
						<tr>
							<td colspan="4">
								<form class="clearfix" id="sform" action="${pageContext.request.contextPath}/flow.html">
									<input type="hidden" name="pageIndex" id="pageIndex">
									<div style="float:left">
										<p style="float:left; margin-left:30px;"><label>选择项目：</label>
                                            <select style="width:100px;" name="projectid">
                                                <option <c:if test='${projectid==0}'> selected</c:if> value="0">请选择项目</option>
                                                 <c:forEach items="${list}" var="pro">
                                                	<option <c:if test='${pro.projectid==projectid}'> selected</c:if> value="${pro.projectid}">${pro.projectname}</option>
                                                </c:forEach>
                                            </select>
										<p style="float:left; margin-left:30px;">
										<input type="submit" class="btn" value="查询"/></p>
									</div>
								</form>
							<td>
						</tr>
                        <!-- 一条线 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <!-- 列表展示开始 -->
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="96%">
                                <table width="100%">
                                    <tr>
                                        <td colspan="2">
                                            <form action="" method="">
                                                <table width="100%"  class="cont tr_color">
                                                    <tr>
                                                        <th>流程名字</th>
                                                        <th>说明</th>
                                                        <th>制定人</th>
                                                        <th>所属项目</th>                                                        
                                                        <th>操作</th>
                                                    </tr>
                                                 <c:forEach items="${prolist}" var="pro">
                                                    <tr align="center" class="d">
                                                        <td>${pro.type}</td>
                                                        <td>${pro.explain}</td>
                                                        <td>${pro.userName}</td>
                                                        <td>${pro.projectName}</td>
                                                        <td>															
                                                        	<a href="${pageContext.request.contextPath}/startprocess.html?processid=${pro.processid}">发起</a>&nbsp;&nbsp;                                 
														</td>
                                                    </tr>
                                               	</c:forEach>
                                                </table>
                                            </form>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="2%">&nbsp;</td>
                        </tr>
                        <!--列表展示结束 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="51%" class="left_txt">
                           		
								<!--
								<a href="list_manager.html">销售经理</a>&nbsp;&nbsp;&nbsp;
								<a href="list_director.html">销售总监</a>
								-->
                            	<div style="float:right;">
									<b>
									<a href="javascript:void(0);" onclick="doSearch(1);">首页</a>&nbsp;&nbsp;&nbsp;
									<a href="javascript:void(0);" onclick="doSearch(${pageIndex-1});">上一页</a>&nbsp;&nbsp;&nbsp;
									&lt;&lt;&nbsp;&nbsp;&nbsp;
									<c:choose>
									<c:when test="${pageIndex>4}">
										<c:choose>
										<c:when test="${totalPages-pageIndex>4}">
													<a>...</a>&nbsp;&nbsp;&nbsp;
													<a href="javascript:void(0);" onclick="doSearch(${pageIndex-2});">${pageIndex-2}</a>&nbsp;&nbsp;&nbsp;
													<a href="javascript:void(0);" onclick="doSearch(${pageIndex-1});">${pageIndex-1}</a>&nbsp;&nbsp;&nbsp;
													<a href="javascript:void(0);"  style="color: red;" onclick="doSearch(${pageIndex});">${pageIndex}</a>&nbsp;&nbsp;&nbsp;
													<a href="javascript:void(0);" onclick="doSearch(${pageIndex+1});">${pageIndex+1}</a>&nbsp;&nbsp;&nbsp;
													<a href="javascript:void(0);" onclick="doSearch(${pageIndex+2});">${pageIndex+2}</a>&nbsp;&nbsp;&nbsp;
													<a>...</a>
										</c:when>
										<c:otherwise>
										<a>...</a>&nbsp;&nbsp;&nbsp;
										 <a href="javascript:void(0);" <c:choose><c:when test="${totalPages-4==pageIndex}"> style="color: red;"</c:when></c:choose> onclick="doSearch(${totalPages-4});">${totalPages-4}</a>&nbsp;&nbsp;&nbsp;
											<a href="javascript:void(0);" <c:if test="${totalPages-3==pageIndex}"> style="color: red;"</c:if> onclick="doSearch(${totalPages-3});">${totalPages-3}</a>&nbsp;&nbsp;&nbsp;
											 <a href="javascript:void(0);" <c:if test="${totalPages-2==pageIndex}"> style="color: red;"</c:if>  onclick="doSearch(${totalPages-2});">${totalPages-2}</a>&nbsp;&nbsp;&nbsp;
											<a href="javascript:void(0);"  <c:if test="${totalPages-1==pageIndex}"> style="color: red;"</c:if> onclick="doSearch(${totalPages-1});">${totalPages-1}</a>&nbsp;&nbsp;&nbsp;
											<a href="javascript:void(0);" <c:if test="${totalPages==pageIndex}"> style="color: red;"</c:if> onclick="doSearch(${totalPages});">${totalPages}</a>&nbsp;&nbsp;&nbsp;
										</c:otherwise>
										</c:choose>
									</c:when>
									<c:otherwise>
										<c:choose>
											<c:when test="${totalPages>4}">
												<c:choose>
													<c:when test="${totalPages==5}">
														<a href="javascript:void(0);" <c:if test="${pageIndex==1}"> style="color: red;"</c:if> onclick="doSearch(1);">1</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==2}"> style="color: red;"</c:if> onclick="doSearch(2);">2</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==3}"> style="color: red;"</c:if> onclick="doSearch(3);">3</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==4}"> style="color: red;"</c:if> onclick="doSearch(4);">4</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==5}"> style="color: red;"</c:if> onclick="doSearch(5);">5</a>&nbsp;&nbsp;&nbsp;
													</c:when>
													<c:otherwise>
														<a href="javascript:void(0);" <c:if test="${pageIndex==1}"> style="color: red;"</c:if> onclick="doSearch(1);">1</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==2}"> style="color: red;"</c:if> onclick="doSearch(2);">2</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==3}"> style="color: red;"</c:if> onclick="doSearch(3);">3</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==4}"> style="color: red;"</c:if> onclick="doSearch(4);">4</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==5}"> style="color: red;"</c:if> onclick="doSearch(5);">5</a>&nbsp;&nbsp;&nbsp;
														<a>...</a>
													</c:otherwise>
												</c:choose>
											</c:when>
											<c:when test="${totalPages==4}">
												<a href="javascript:void(0);" <c:if test="${pageIndex==1}"> style="color: red;"</c:if> onclick="doSearch(1);">1</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==2}"> style="color: red;"</c:if> onclick="doSearch(2);">2</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==3}"> style="color: red;"</c:if> onclick="doSearch(3);">3</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==4}"> style="color: red;"</c:if> onclick="doSearch(4);">4</a>&nbsp;&nbsp;&nbsp;
														
											</c:when>
											<c:when test="${totalPages==3}">
												<a href="javascript:void(0);" <c:if test="${pageIndex==1}"> style="color: red;"</c:if> onclick="doSearch(1);">1</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==2}"> style="color: red;"</c:if> onclick="doSearch(2);">2</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==3}"> style="color: red;"</c:if> onclick="doSearch(3);">3</a>&nbsp;&nbsp;&nbsp;
														
											</c:when>
											<c:when test="${totalPages==2}">
												<a href="javascript:void(0);" <c:if test="${pageIndex==1}"> style="color: red;"</c:if> onclick="doSearch(1);">1</a>&nbsp;&nbsp;&nbsp;
														<a href="javascript:void(0);" <c:if test="${pageIndex==2}"> style="color: red;"</c:if> onclick="doSearch(2);">2</a>&nbsp;&nbsp;&nbsp;
														
											</c:when>
											<c:when test="${totalPages==1}">
												<a href="javascript:void(0);" <c:if test="${pageIndex==1}"> style="color: red;"</c:if> onclick="doSearch(1);">1</a>&nbsp;&nbsp;&nbsp;
											</c:when>
										</c:choose>
									</c:otherwise>
									</c:choose>
									
									<a href="#">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;
									<a href="javascript:void(0);" onclick="doSearch(${pageIndex+1});">下一页</a>&nbsp;&nbsp;&nbsp;
									<a href="javascript:void(0);" onclick="doSearch(${totalPages});">尾页</a>&nbsp;&nbsp;&nbsp;
									
									每页显示<span class="yanse" style="color: red;">${totalPages}</span>条&nbsp;&nbsp;&nbsp;
									当前<span style="color: red;">${pageIndex}</span> /<span style="color: red;">${totalPages}</span> 页&nbsp;&nbsp;&nbsp;
									共<span style="color: red;">${count}</span>条
									</b>
								</div>
                            </td>
                            <td>&nbsp;</td><td>&nbsp;</td>
                        </tr>
                    </table>
                </td>
                <td background="../../../static/Images/mail_right_bg.gif">&nbsp;</td>
            </tr>
            <!-- 底部部分 -->
            <tr>
                <td valign="bottom" background="../../../static/Images/mail_left_bg.gif">
                    <img src="../../../static/Images/buttom_left.gif" width="17" height="17" />
                </td>
                <td background="../../../static/Images/buttom_bgs.gif">
                    <img src="../../../static/Images/buttom_bgs.gif" width="17" height="17">
                </td>
                <td valign="bottom" background="../../../static/Images/mail_right_bg.gif">
                    <img src="../../../static/Images/buttom_right.gif" width="16" height="17" />
                </td>           
            </tr>
        </table>

    
    </body>
</html>